/*    */ package com.icity.config;
/*    */ 
/*    */ import org.springframework.context.annotation.Bean;
/*    */ import org.springframework.context.annotation.Configuration;
/*    */ import org.springframework.web.cors.CorsConfiguration;
/*    */ import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
/*    */ import org.springframework.web.filter.CorsFilter;
/*    */ 
/*    */ 
/*    */ 
/*    */ @Configuration
/*    */ public class CorsConfig
/*    */ {
/*    */   public CorsConfiguration buildConfig()
/*    */   {
/* 16 */     CorsConfiguration corsConfiguration = new CorsConfiguration();
/* 17 */     corsConfiguration.addAllowedOrigin("*");
/* 18 */     corsConfiguration.addAllowedHeader("*");
/* 19 */     corsConfiguration.addAllowedMethod("*");
/* 20 */     return corsConfiguration;
/*    */   }
/*    */   
/*    */   @Bean
/* 24 */   public CorsFilter corsFilter() { UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
/* 25 */     source.registerCorsConfiguration("/**", buildConfig());
/* 26 */     return new CorsFilter(source);
/*    */   }
/*    */ }


/* Location:              /Users/apple/Desktop/需求/block/interface/blockchain_interface.jar!/BOOT-INF/classes/com/icity/config/CorsConfig.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       0.7.1
 */